package com.demo.richText;

import com.demo.richText.util.ComputerInfoUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;

import java.io.IOException;

/**
 * @author 小乌龟
 */
@SpringBootApplication
public class RichTextApplication {

    public static void main(String[] args) throws IOException {
        ConfigurableApplicationContext context = SpringApplication.run(RichTextApplication.class, args);
        Environment environment = context.getBean(Environment.class);
        System.out.println("==========启动成功==========");
        System.out.println("启动成功，后端服务API地址：http://" + ComputerInfoUtil.getIpAddr() + ":"
                + environment.getProperty("server.port") + "/rich/doc.html");
    }

}
